package codequity.two;

import java.util.Scanner;

public class Client21 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入多个数字判断奇偶：");
        while (input.hasNextInt()) {
            int i = input.nextInt();
            String str = i + "->" + (i % 2 == 0 ? "偶数" : "奇数");
            System.out.println(str);
        }

        int remainder = remainder(-1, 2);
        System.out.println(remainder);
    }

    //模拟取余计算，dividend被除数，divisor除数
    public static int remainder(int dividend, int divisor) {
        return dividend - dividend / divisor * divisor;
    }
}
